From: Ihor Radchenko Date: Thu, 16 Jun 2022 01:28:27 +0000 (+0800) Subject: org-element-map: Avoid repetitive `plist-get' call X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~16^2~1886^2~1711 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=4f37a3b299bcec71a0e9bdd84b7b226494006fe4;p=emacs.git org-element-map: Avoid repetitive `plist-get' call * lisp/org/org-element.el (org-element-map): Do not call `(plist-get info :ignore-list)' on every iteration. --- diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index 9db1406b3fb..20b5b030392 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el @@ -4391,6 +4391,7 @@ looking into captions: ;; every element it encounters. (and (not (eq category 'elements)) (setq category 'elements)))))))) + (--ignore-list (plist-get info :ignore-list)) --acc) (letrec ((--walk-tree (lambda (--data) @@ -4400,7 +4401,7 @@ looking into captions: (cond ((not --data)) ;; Ignored element in an export context. - ((and info (memq --data (plist-get info :ignore-list)))) + ((and info (memq --data --ignore-list))) ;; List of elements or objects. ((not --type) (mapc --walk-tree --data)) ;; Unconditionally enter parse trees.